(define (domain chainOfRooms)
  (:requirements :typing :strips :non-deterministic)
  (:types room)
  (:predicates (door_unlocked ?r - room)
               (visited ?r - room)
               (light_on ?r - room)
               (light_off ?r - room)
               (agent_position ?r - room)
               (adjacent ?rl - room ?rr - room)
  )

  (:action move_left_right
   :parameters (?rl - room ?rr - room)
   :precondition (and (agent_position ?rl)
                      (adjacent ?rl ?rr)
                      (door_unlocked ?rl)
                 )
   :effect (and (not (agent_position ?rl))
                (agent_position ?rr)
                (visited ?rr)
           )
  )
  
  (:action move_right_left
   :parameters (?rl - room ?rr - room)
   :precondition (and (agent_position ?rr)
                      (adjacent ?rl ?rr)
                      (door_unlocked ?rl)
                 )
   :effect (and (not (agent_position ?rr))
                (agent_position ?rl)
                (visited ?rl)
           )
  )

  (:action turn_light_on
   :parameters (?r - room)
   :precondition (and (light_off ?r)
                      (agent_position ?r)
                 )
   :effect (and (light_on ?r)
                (not (light_off ?r))
                (oneof (door_unlocked ?r)
                       (and )
                )
           )
  )
  
  (:action unlock_door
   :parameters (?r - room)
   :precondition (and (agent_position ?r)
                      (light_on ?r)
                 )
   :effect (door_unlocked ?r)
  )
)
